<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>vip免赠彩票</title>
		<link href="css/mui.min.css" rel="stylesheet" />
		<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
		<style>
			ul {
				font-size: 14px;
				color: #8f8f94;
			}
			
			.mui-btn {
				padding: 10px;
			}
			
			.mui-content {
				padding: 10px;
			}
			
			.mui-content-padded {
				padding: 10px;
			}
			
			.inwrap {
				text-align: center;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav" style="padding-right: 15px;">
			<a href="main.html" class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">vip免赠彩票</h1>
		</header>
		<div class="mui-content">
			<div class="mui-content-padded">

				<div class="mui-input-row">
					<input id='phoneNum' type="text" class="mui-input-clear" placeholder="请输入充值手机号">
					<input id='amount' type="number" class="mui-input-clear mui-input-money" placeholder="充值vip服务">
				</div>

				<button type="button" class="mui-btn mui-icon " onclick="addMoney(100)">
		          <span >100</span>         
		        </button>
				<button type="button" class="mui-btn mui-icon " onclick="addMoney(200)">
		          <span >200</span>         
		        </button>
				<button type="button" class="mui-btn mui-icon " onclick="addMoney(500)">
		          <span >500</span>         
   		        </button>
				<button type="button" class="mui-btn mui-icon " onclick="addMoney(800)">
		          <span >800</span>         
                </button>
				<button type="button" class="mui-btn mui-icon " onclick="addMoney(1000)"> 
				  <span >1000</span>         
                </button>

		</div>

			<button id='create' onclick="createOrder()" class="mui-btn mui-btn-block mui-btn-primary">确认购买</button>
			<button id='gobet' onclick="goInfo()" class="mui-btn mui-btn-block mui-btn-green">直接兑换</button>

			<p class="inwrap" style="word-break:none;overflow:hidden; font-size: 10px; font-family: 'microsoft yahei'">充值代表同意
				<a href="userAgreement.html">用户协议</a>
			</p>
			<p class="inwrap">购买vip服务赠送10倍积分</p>

		</div>
		<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
        <script>
		   var url = location.search; //获取url中"?"符后的字串  
		   var theRequest = new Object();  
		   if (url.indexOf("?") != -1) {  
		      var str = url.substr(1);  
		      strs = str.split("&");  
		      for(var i = 0; i < strs.length; i ++) {  
		         theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);  
		      }  
		   }   		    
		   var data=theRequest;	
		   console.log(data);
   		   var money=data.money;  		   
   		   var phoneNum=data.phoneNum;
   		   localStorage.setItem("phoneNum",phoneNum); 
   		   localStorage.setItem("money",money); 
   		   if(phoneNum){
   		   	console.log(111)
// 		   		$("#phoneNum").val(phoneNum);   		   		  		   		
   		   		$("#phoneNum").val(localStorage.getItem("phoneNum"));
   		   }
   		   if(money){   		   	
   		   	 	$("#amount").val(localStorage.getItem("money"))    		
        	}
        	function addMoney(a){         		
        		$("#amount").val(a);        		      		
        	}       	               	        	
        </script>
		<script src="js/mui.min.js"></script>
		<script src="js/app.js"></script>
		<script type="text/javascript" src="js/common.js"></script>		
		<script src="https://cdn.bootcss.com/layer/3.0.1/layer.min.js"></script>
		<script type="text/javascript" src="js/recharge.js"></script>
        
	</body>

</html>